<template>
  <el-tree
    style="max-width: 600px"
    :data="dataList"
    icon-class="none"
  >
  </el-tree>
</template>
<script lang="ts" setup>
import { reactive, onMounted } from 'vue'
import { Tree } from '../types/index'
import { filterTreeData } from '../../../utils/FilterTreeData'
import { getTreeData } from '../../../api/ScopeOfOperationOfTheOrganization'
// tree 数据
let dataList: Tree[] = reactive()
onMounted(async () => {
  const { data } = await getTreeData()
  console.log(JSON.parse(data))
  dataList = filterTreeData(JSON.parse(data))
  console.log(dataList)
})
</script>
<style>
</style>